//
//  ActivityCollectionViewCell.swift
//  甜言蜜语
//
//  Created by yingli_yanfa_liuxingyu on 16/10/20.
//  Copyright © 2016年 wl. All rights reserved.
//


import UIKit

class ActivityCollectionViewCell: UICollectionViewCell {
    @IBOutlet weak var backImage: UIImageView!
    @IBOutlet weak var stateLabel: UILabel!
   // @IBOutlet weak var limitLabel: UILabel!
    
    @IBOutlet weak var countLabel: UILabel!
    @IBOutlet weak var diamondLabel: UILabel!
    
    @IBOutlet weak var titleLbl: UILabel!
    var model: ActivityModel? {
        didSet {
            self.setupView()
        }
    }
    
    func setupView() {
        stateLabel.text = model?.state
        backImage.sd_setImageWithURL(NSURL(string: model!.imgsrc))
        self.backImage.contentMode = UIViewContentMode.ScaleAspectFill
        self.backImage.clipsToBounds = true
        //limitLabel.text = model?.limitstr
        diamondLabel.text = String(format: "%@钻石",(self.model?.integral)!)
        countLabel.text = String(model!.partnum)
        titleLbl.text = model?.title
    }
}
